<template>
  <div id='CartNavBar'>
    <nav-bar>
      <div slot="center">购物车({{cartlistlength}})</div>
    </nav-bar>
  </div>
</template>

<script>
  import NavBar from 'components/content/nav-bar/NavBar.vue'

  import { mapGetters } from 'vuex'

  export default {
    name: 'CartNavBar',
    data() {
      return {}
    },
    components: {
      NavBar
    },
    computed: {
      ...mapGetters(['cartlistlength'])
    },
    methods: {},
  }
</script>

<style scoped>
  #CartNavBar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: pink;
    color: #fff;
    font-size: 18px;
  }
</style>